import { Controller, Get, Post, Body, Patch, Param, Delete } from '@nestjs/common';
import { RedisCacheModuleService } from './redis-cache-module.service';
import { CreateRedisCacheModuleDto } from './dto/create-redis-cache-module.dto';
import { UpdateRedisCacheModuleDto } from './dto/update-redis-cache-module.dto';

@Controller('redis-cache-module')
export class RedisCacheModuleController {
  constructor(private readonly redisCacheModuleService: RedisCacheModuleService) {}

  @Post()
  create(@Body() createRedisCacheModuleDto: CreateRedisCacheModuleDto) {
    return this.redisCacheModuleService.create(createRedisCacheModuleDto);
  }

  @Get()
  findAll() {
    return this.redisCacheModuleService.findAll();
  }

  @Get(':id')
  findOne(@Param('id') id: string) {
    return this.redisCacheModuleService.findOne(+id);
  }

  @Patch(':id')
  update(@Param('id') id: string, @Body() updateRedisCacheModuleDto: UpdateRedisCacheModuleDto) {
    return this.redisCacheModuleService.update(+id, updateRedisCacheModuleDto);
  }

  @Delete(':id')
  remove(@Param('id') id: string) {
    return this.redisCacheModuleService.remove(+id);
  }
}
